LoginPanel = {}
--模仿mono脚本的this
local this = LoginPanel
--模仿mono脚本的this.GameObject,this.transform
local transform
local gameObject
local behaviour

function LoginPanel.New()
    --打开页面
    panelMgr:CreatePanel('Login',nil)
end

--启动事件
function LoginPanel.Awake(obj)

    logWarn("LoginPanel.Awake")
    gameObject = obj
    transform = obj.transform
    behaviour = obj:GetComponent('LuaBehaviour')

    this.InitView()

end

function LoginPanel.InitView()

    local openBtn = transform:Find("Open").gameObject
    behaviour:AddClick(openBtn,this.OnOpenClick)

end

function LoginPanel.Start(  )

    logWarn("LoginPanel.Start")

end

function LoginPanel.OnOpenClick()

    ThunderManager.New()

    GameObject.Destroy(gameObject)
    
    logWarn("进入游戏")

end